home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_gimp.idb / usr / freeware / include / libgimp / gimpunit.h.z / gimpunit.h
Encoding:
C/C++ Source or Header  |  2002-07-08  |  2.4 KB  |  87 lines

  1. /* LIBGIMP - The GIMP Library 
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball 
  3.  *
  4.  * gimpunit.h
  5.  * Copyright (C) 1999-2000 Michael Natterer <mitch@gimp.org>
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the
  19.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  * Boston, MA 02111-1307, USA.
  21.  */
  22.  
  23. /* NOTE:
  24.  *
  25.  * This file serves as header for both app/gimpunit.c and libgimp/gimpunit.c
  26.  * because the unit functions are needed by widgets which are used by both
  27.  * the gimp app and plugins.
  28.  */
  29.  
  30. #ifndef __GIMP_UNIT_H__
  31. #define __GIMP_UNIT_H__
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif /* __cplusplus */
  36.  
  37. /* For information look into the C source or the html documentation */
  38.  
  39.  
  40. typedef enum
  41. {
  42.   GIMP_UNIT_PIXEL   = 0,
  43.  
  44.   GIMP_UNIT_INCH    = 1,
  45.   GIMP_UNIT_MM      = 2,
  46.   GIMP_UNIT_POINT   = 3,
  47.   GIMP_UNIT_PICA    = 4,
  48.  
  49.   GIMP_UNIT_END     = 5,
  50.  
  51.   GIMP_UNIT_PERCENT = 65536
  52. } GimpUnit;
  53.  
  54.  
  55. gint       gimp_unit_get_number_of_units          (void);
  56. gint       gimp_unit_get_number_of_built_in_units (void);
  57.  
  58. GimpUnit   gimp_unit_new                 (gchar    *identifier,
  59.                       gdouble   factor,
  60.                       gint      digits,
  61.                       gchar    *symbol,
  62.                       gchar    *abbreviation,
  63.                       gchar    *singular,
  64.                       gchar    *plural);
  65.  
  66. gboolean   gimp_unit_get_deletion_flag   (GimpUnit  unit);
  67. void       gimp_unit_set_deletion_flag   (GimpUnit  unit,
  68.                       gboolean  deletion_flag);
  69.  
  70. gdouble    gimp_unit_get_factor          (GimpUnit  unit);
  71.  
  72. gint       gimp_unit_get_digits          (GimpUnit  unit);
  73.  
  74. gchar    * gimp_unit_get_identifier      (GimpUnit  unit);
  75.  
  76. gchar    * gimp_unit_get_symbol          (GimpUnit  unit);
  77. gchar    * gimp_unit_get_abbreviation    (GimpUnit  unit);
  78. gchar    * gimp_unit_get_singular        (GimpUnit  unit);
  79. gchar    * gimp_unit_get_plural          (GimpUnit  unit);
  80.  
  81.  
  82. #ifdef __cplusplus
  83. }
  84. #endif /* __cplusplus */
  85.  
  86. #endif /* __GIMP_UNIT_H__ */
  87.